package com.zzl.java8.czbk.stream.test2;

import java.util.Objects;

/**
 * description: 学生类
 * @author 朱正磊
 * @date 2022-07-01 14:29:43
 */
public class PbStudent {

    private Long id;

    private String name;

    private String className;

    public PbStudent() {

    }

    public PbStudent(Long id, String name, String className) {
        this.id = id;
        this.name = name;
        this.className = className;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (o == null || getClass() != o.getClass())
            return false;
        PbStudent pbStudent = (PbStudent) o;
        return id.equals(pbStudent.id) && name.equals(pbStudent.name);
    }

    @Override
    public int hashCode() {
         return Objects.hash(id, name);
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public String toString() {
        return "PbStudent{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", className='" + className + '\'' +
                '}';
    }

}
